{extend name="Base" /}
{block name="title"}{$title}{/block}
{block name="body"}
{load href="/viewer/viewer.min.css"}
{load href="/viewer/viewer.min.js"}
<div class="am-panel am-panel-default">
	<div class="am-panel-hd">
		<h3 class="am-panel-title">
			<a href="/dl/{$t.type}/{$t.id}/{$u.uuid}">{$t.maintitle}</a>
			{php}$t['excl'] == 1 ? print("<span class='am-badge am-radius excl'>独占</span>") : "";{/php}
			{php}$t['hr'] == 1 ? print("<span class='am-badge am-radius hr'>H&R</span>") : "";{/php}
			{php}($t['discounttime'] == 0 && !empty($t['discount'])) || ($t['discounttime'] >= nowtime() && !empty($t['discount'])) ? print("<span class='am-badge am-radius official'>" . $t['discount_name'] . "</span><span class='am-badge am-radius official'>优惠截止至 " . $t['discounttime'] . "</span>") : "";{/php}
			<a href='/report/{$t.id}/{$t.type}'><span class='am-badge am-radius report'>反馈</span></a>
			{if condition="($access eq 1) OR ($t.uploader eq $u.uid)"}
			<a href='/edit/{$t.id}/{$t.type}'><span class='am-badge am-radius limitd'>编辑</span></a>
			{if condition="$access eq 1"}
			<a href='/delete/{$t.id}/{$t.type}'><span class='am-badge am-radius first'>删除</span></a>
			{/if}
			{/if}
		</h3>
	</div>
	<div class="am-panel-bd">
		{php}!empty($t['imdbscore']) && !empty($t['imdburl']) ? print("<a href='$t[imdburl]' target='_blank'>IMDb:" . $t['imdbscore'] . "</a>&nbsp;&nbsp;") : ""{/php}
		<span>类别:{$t.olcate}</span>
		<span>{$t.slcate}</span>&nbsp;&nbsp;
		{php}empty($t['author']) ? "" : print("<span>制作:$t[author]</span>&nbsp;&nbsp;"){/php}
		<span>容量:{$t.torrentsize|getSize}</span>&nbsp;&nbsp;
		<span>文件数量:{$t.torrentfiles}</span>&nbsp;&nbsp;
		<span>发布时间:{$t.addtime}</span>&nbsp;&nbsp;
		{php}$t['anonymous'] == 0 ? print("<a href='/users/$t[uploader]'>发布者:" . $t['uploadername'] . "</a>") : ""{/php}
	</div>
	<ul class="am-list am-list-static">
		{php}$t['type'] == "m" ? print("
		<li>" . $t['subtitle'] . "</li>
		") : ""{/php}
		<li id="descs_content">{$t.descs}</li>
	</ul>
</div>
<script>
	var $img = $("#descs_content p img");
	$img.each(function () {
		$(this).addClass("am-img-responsive");
	});
	$img.viewer({
		toolbar: false,
		navbar: false,
		title: false
	});
</script>
{/block}